import request from '@/utils/request'

// 查询日期预约列表
export function listDate(query) {
  return request({
    url: '/infomanagement/date/list',
    method: 'get',
    params: query
  })
}

// 查询日期预约详细
export function getDate(id) {
  return request({
    url: '/infomanagement/date/' + id,
    method: 'get'
  })
}

// 新增日期预约
export function addDate(data) {
  return request({
    url: '/infomanagement/date', 
    method: 'post',
    data: data
  })
}

// 修改日期预约
export function updateDate(data) {
  return request({
    url: '/infomanagement/date', 
    method: 'put',
    data: data
  })
}

// 删除日期预约
export function delDate(id) {
  return request({
    url: '/infomanagement/date/' + id,
    method: 'delete'
  })
}

export function selectByDate(date, options = {}) {
  return request({
    url: '/infomanagement/date/date/' + date,
    method: 'get',
    ...options // 支持传入 signal 等选项
  })
}
